package com.ruoyi.project.module.youke.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.youke.mapper.YoukeMapper;
import com.ruoyi.project.module.youke.domain.Youke;
import com.ruoyi.project.module.youke.service.IYoukeService;
import com.ruoyi.common.support.Convert;

/**
 * 旅客 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-15
 */
@Service
public class YoukeServiceImpl implements IYoukeService 
{
	@Autowired
	private YoukeMapper youkeMapper;

	/**
     * 查询旅客信息
     * 
     * @param userId 旅客ID
     * @return 旅客信息
     */
    @Override
	public Youke selectYoukeById(Integer userId)
	{
	    return youkeMapper.selectYoukeById(userId);
	}
	
	/**
     * 查询旅客列表
     * 
     * @param youke 旅客信息
     * @return 旅客集合
     */
	@Override
	public List<Youke> selectYoukeList(Youke youke)
	{
	    return youkeMapper.selectYoukeList(youke);
	}
	
    /**
     * 新增旅客
     * 
     * @param youke 旅客信息
     * @return 结果
     */
	@Override
	public int insertYouke(Youke youke)
	{
	    return youkeMapper.insertYouke(youke);
	}
	
	/**
     * 修改旅客
     * 
     * @param youke 旅客信息
     * @return 结果
     */
	@Override
	public int updateYouke(Youke youke)
	{
	    return youkeMapper.updateYouke(youke);
	}

	/**
     * 删除旅客对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteYoukeByIds(String ids)
	{
		return youkeMapper.deleteYoukeByIds(Convert.toStrArray(ids));
	}
	
}
